package cn.ecnu.pojo.personal;

import cn.hutool.json.JSONArray;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;

@Data
@TableName(value = "title",autoResultMap = true)
/*用户的title显示 */
public class Title {

    @TableId(value = "user_id")
    @NotNull
    private Integer userId;
    @NotEmpty
    private String username;

    @NotEmpty
    private String tag1;
    @NotEmpty
    private String tag2;
    @NotEmpty
    private String note;
    @NotEmpty
    private String direction;
    @NotEmpty
    private String location;

    @TableField(typeHandler = JacksonTypeHandler.class) //这个结合着autoResultMap来一起用
    private List<String> labels;
//    private JSONArray labels;

    private String bulletinCandidate;
    private String bulletinRecommender;
}
